package Jack;

import org.springframework.beans.factory.annotation.Value;

import javax.annotation.Resource;

/**
 * @Fou Jack of all trades and master of none.
 * @date 2022/1/4 10:26
 */
public class XMLInstance {
    @Value("张三")
    private String name;

    public void setName(String name) {
        this.name = name;
    }
    @Resource(name = "CleanAir")
    private  IAir air;

    public void setAir(IAir air) {
        this.air = air;
    }

  public void Breath(){
      System.out.println("Name:"+this.name+";Air:"+this.air.toString());
  }

    public XMLInstance(String name, IAir air) {

        this.name = name;
        this.air = air;
    }
}
